package com.qf.vo;

import com.qf.exception.NewsException;

public class ResultVoUtils {
    public static ResultVo success(Object data){
        ResultVo resultVo=new ResultVo(0,"成功",data );
        return resultVo;
    }
    public static ResultVo success(){
        return new ResultVo(0,"成功" , null);
    }
    public static ResultVo err(NewsException ex){
        return new ResultVo(ex.getCode(),ex.getMsg() ,null );
    }
}
